Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio playback #201

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Audio playback #201

wants to merge 8 commits into from

Conversation

AmarHadzic
Copy link
Collaborator

@AmarHadzic AmarHadzic commented Nov 11, 2024

Fixes #199

What was changed
The audio playback was fixed so that users can listen to recorded audio. Now it is an inline url that users can click on and open link, which leads the user to a chrome window and an audio player.

Why was it changed
Previously, users were not able to listen to recorded audio. Also, on the inline editor, nothing would show up after a user recorded audio. These issues led to poor user experience. Now users are able to playback their recorded audio, leading to an improved user experience.

How was it changed
Refactored and changed insertAudioToEditor function to handle and set the audioUri as an <a> </a> tag. This allows users to highlight and open the audio as a link. The audio link const audioLink = `${currentContent}<a href="${audioUri}">${audioUri}</a><br>`; captures previous content such as images, videos, or other audio and updates the inline editor.

Updated interface
image

lib/navigation/AppNavigator.tsx Show resolved Hide resolved
lib/screens/AudioPlayerScreen.tsx Show resolved Hide resolved
styles/pages/NoteStyles.tsx Outdated Show resolved Hide resolved
lib/screens/AudioPlayerScreen.tsx Show resolved Hide resolved
Copy link
Collaborator

@rcAsironman rcAsironman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AmarHadzic All checks have failed. Please review your work and resubmit it. In addition, I noticed that when I click on the audio URL, it doesn't redirect to the browser.

Copy link
Collaborator

@rcAsironman rcAsironman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AmarHadzic could you please write test cases for the functionality you worked on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Audio Playback and Align Audio Inline in AddNoteScreen Editor
3 participants